<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
<%-- 	 <%@ include file="/common/import.jsp"%>--%>
    <base href="<%=basePath%>">
    <link rel="stylesheet" href="${ctx}/css/style.css" type="text/css">
	<script src="${ctx}/js/tab.js"></script>
	
    <title>My JSP 'add.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script>
	<%--
		var user_list_url = "${ctx}/member/uct/queryUsersByUType?userType=1";
		//alert(user_list_url);
		$.ajax({ 
			type:'post',
			url:user_list_url,
			dataType:'json',
			success:function(data){
				//alert(data);
				//var total = data.total;
				var users = data;
				for ( var i = 0; i < data.length; i++) {
					var user = users[i];				
					var username = user.userEname;
					var realname = user.userCname;
		   	 		var toption = " <option value='"+username+"'>"+realname+"</option>";
			   	 	$("#"+"clientManager").append(toption);
	      		}			
			},
			error:function(){
				 alert("请检查服务器！");
			}
		}); 
		
		function getseledeptval(selectId,valId,textId){
			var selval = $("#"+selectId).val();
			var seltext = $("#"+selectId).find("option:selected").text();
			if(selval == null || selval == "" || selval == undefined){
				$("#"+valId).val("");
				$("#"+textId).val("");
			}else{
				$("#"+valId).val(selval);
				$("#"+textId).val(seltext);
			}	
		}
		--%>
	</script>
	<script>
	<%--
	var memberRoles_url = "${ctx}/dict/memberType/toAddMember.action";
	$.ajax({ 
		type:'post',
		url:memberRoles_url,
		dataType:'json',
		success:function(data){
			var toption = "";
			for ( var i = 0; i < data.length; i++) {
				var textAndValue = data[i].split("|");
				var itemValue = textAndValue[0];
				var itemText = textAndValue[1];
		   	 	toption += " <input type='checkbox' name='memberRoles' value='"+itemValue+"'/>"+itemText;
      			if((i + 1) % 3 == 0){
      				toption += "<br/>";
      			}
			}			
		   	document.getElementById("memberRoleArray").innerHTML =  toption;
		},
		error:function(){
			 alert("请检查服务器！");
		}
	});
--%>
	</script>

  </head>
  
  <body>
			<div class="jbxx_cont" id="tabcontent_10" style="display:block">
				<table cellpadding="0" cellspacing="0" class="info">
					<tr>
						<th colspan="4">基本信息</th>
					</tr>
					<tr>
						<th><label for="memberEname" class="">会员账号<font color="red">*</font></label>
						</th>
						<td>
							<input type="text" id="memberEname" name="memberEname" 
							required="true"  class="easyui-validatebox" validType="EG" missingMessage="请填写会员账号" invalidMessage="会员账号只允许英文字母、数字及下划线">
						</td>
						<th><label for="memberCname" class="">会员全称<font color="red">*</font></label>
						</th>
						<td><input type="text" id="memberCname" name="memberCname" 
						required="true"  class="easyui-validatebox" validType="loginName" missingMessage="请填写会员全称" invalidMessage="会员全称只允许汉字、英文字母、数字及下划线">
						</td>
					</tr>
					<tr >
						<th><label for="shortName" class="">会员简称<font color="red">*</font></label>
						</th>
						<td><input type="text"  id="shortName"
							name="shortName" 
							required="true"  class="easyui-validatebox" validType="loginName" missingMessage="请填写会员简称" invalidMessage="会员简称只允许汉字、英文字母、数字及下划线">
						</td>
						<th>
							<label for="memberType" class="">会员属性</label>
						</th>
						<td>
							<input type="radio"  name="memberType" value="0" checked="checked" />个人
							<input type="radio"  name="memberType" value="1" />机构
						</td>
					</tr>
					<tr >
						<th><label for="memberRoles" class="">会员类型<font color="red">*</font></label>
						</th>
						<td colspan="3"><span id="memberRoleArray"> </span>
						</td>
<%--						<th><label for="clientManager" class="">客户经理<font color="red">*</font></label>--%>
<%--						</th>--%>
<%--						<td><select class="" id="clientManager"--%>
<%--							name="clientManager" required="required"--%>
<%--							onchange="getseledeptval('clientManager','mgrUsername','mgrRealname');">--%>
<%--								<option value="">选择负责人</option>--%>
<%--						</select>--%>
<%--						</td>--%>
					</tr>
					<tr >
						<th><label for=regTime class="">注册时间</label>
						</th>
						<td><input type="text"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"
							class="Wdate" id="regTime" name="regTime" value="">
						</td>
						<th><label for="str50_1" class="">入会时间</label>
						</th>
						<td><input type="text"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"
							class="Wdate" id="str50_1" name="str50_1"
							value="">
						</td>
					</tr>
					<tr>
						<th><label for="certType">证件类型</label>
						</th>
						<td><select id="certType" name="certType">
								<option value="">--请选择--</option>
							</select>
						</td>
						<th><label for="certNo">证件号码</label>
						</th>
						<td>
						<input type="text" id="certNo" name="certNo" value="">
						</td>
					</tr>
				</table>
	 </div>	
  </body>
</html>
